<html>
<head>
<script type="text/javascript" src="longvalue.js"></script>
<script type="text/javascript" src="jvm-loader.js"></script>
<script type="text/javascript" src="jvm.js"></script>
<script type="text/javascript" src="jvm-lib.js"></script>
<script type="text/javascript" src="jar-reader.js"></script>
</head>
<body>
<div>
  <select id="code">
     <option>Hello</option>
     <option>Bottles</option>
     <option>ZeroDiv</option>
     <option>ZeroDivCatch</option>
     <option>Class1</option>
     <option>TestJar</option>
     <option>Gen1</option>
  </select> <button id="run">Run</button>
</div>
<script type="text/javascript">
getFactory.searchLocations = [
  "sandbox/simple", 
  loadJarFile("sandbox/jar/testjar.jar"),
  "sandbox/generics"
];

var log = function(s) { document.getElementById("log").innerHTML += s.replace(/\</g, "&lt;").replace(/\n/g, "<br>"); };

function run() {
  var codeElement = document.getElementById("code");
  var className = codeElement.options[codeElement.selectedIndex].value;
  document.getElementById("log").innerHTML = "";
  
  
  var factory = getFactory(className);
  factory.statics.main([]);
}

document.getElementById("run").addEventListener("click", run, false);
</script>
<p id="log"></p>
</body></html>
